/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.edu.fatec.ads.facade;

import br.edu.fatec.ads.bo.BusinessObjectAndar;
import br.edu.fatec.ads.classes.Andar;
import br.edu.fatec.ads.classes.Predio;
import br.edu.fatec.ads.util.ComboBoxItem;
import java.util.List;

/**
 *
 * @author Ubirajara
 */
public class FacadeAndar {

    private static FacadeAndar singleton = null;
    private BusinessObjectAndar regraNegocio = null;

    private FacadeAndar(){
        regraNegocio = new BusinessObjectAndar();
    }

    public static FacadeAndar getInstance(){
        if(singleton == null){
            singleton = new FacadeAndar();
        }

        return singleton;
    }

    public List<ComboBoxItem> recuperarAndares(Predio predioSelecionado){
        return regraNegocio.recuperarAndares(predioSelecionado);
    }

    public Andar recuperarAndarPorId(Integer id){
        return regraNegocio.recuperarAndarPeloId(id);
    }

}